home *** CD-ROM | disk | FTP | other *** search
/ STraTOS 1997 April & May / STraTOS 1 - 1997 April & May.iso / CD01 / MUSIC / @FALCON / MGPL-115 / AMIGA / JULMORPH.ASM < prev    next >
Encoding:
Assembly Source File  |  1995-08-23  |  2.4 KB  |  117 lines

  1. ;***********************************************************************
  2. ;***********                                         ***********
  3. ;***********                                         ***********
  4. ;***********            DSP Sample Program                 ***********
  5. ;***********    to test Amiga DSP-Replay under interrupt     ***********
  6. ;***********                                         ***********
  7. ;***********                                         ***********
  8. ;***********          By Simplet / FATAL DESIGN             ***********
  9. ;***********                                         ***********
  10. ;***********************************************************************
  11.  
  12. HSR        equ        $ffe9            ; Host Status Register
  13. HRX        equ        $ffeb            ; Host Receive Register
  14. HTX        equ        $ffeb            ; Host Transmit Register
  15.  
  16. ;    Host Status Register Bit Flags
  17.  
  18. HRDF        equ        0                ; Host Receive Data Full
  19. HTDE        equ        1                ; Host Transmit Data Empty
  20.  
  21.  
  22. ; The P56 Loader jumps here :
  23.  
  24.         org        p:$0
  25.         jmp        <Start
  26.  
  27. ; You must start your program after the Amiga DSP Replay and P56 Loader
  28. ; You can't get a lot of internal memory unless you modify
  29. ; the AMGDSPIT.ASM source and place all the slow tracker routines
  30. ; in external memory...
  31.  
  32. ; You can freely use the Host Commands (but $24 and $26)
  33. ; Warning, You can't use the r7 and m7 registers !!!
  34. ; don't modify the m0->m5 registers too, I don't save them
  35.  
  36.         org        p:$191
  37.  
  38. Start
  39.  
  40. ;
  41. ; Main Loop
  42. ;
  43.         move        #Reelle,r0
  44.         move        #C_Re,r1
  45.         move        #C_Im,r2
  46.         move        #Imaginaire,r4
  47.  
  48. Loop        jclr        #<HRDF,X:<<HSR,Loop
  49.         movep    X:<<HRX,X:X_Dep    ; X de depart
  50.         jclr        #<HRDF,X:<<HSR,*
  51.         movep    X:<<HRX,Y:(r4)        ; Y de depart
  52.         jclr        #<HRDF,X:<<HSR,*
  53.         movep    X:<<HRX,y1        ; Increment
  54.         jclr        #<HRDF,X:<<HSR,*
  55.         movep    X:<<HRX,X:(r1)        ; Re(Cst)
  56.         jclr        #<HRDF,X:<<HSR,*
  57.         movep    X:<<HRX,X:(r2)        ; Im(Cst)
  58.  
  59.         Do        #100,Screen_Loop
  60.  
  61.         move        X:X_Dep,x0
  62.         move        x0,X:(r0)
  63.         
  64.         Do        #320,Line_Loop
  65.  
  66.         move        #>4,b
  67.         move        X:(r0),x0        Y:(r4),y0
  68.  
  69. Pixel_Loop
  70.         mpy        x0,x0,a
  71.         mac        y0,y0,a
  72.         asl        a
  73.         asl        a
  74.         jes        <Send_PixL    ; > (2^2/4) ?
  75.  
  76.         mpy        x0,x0,a
  77.         mac        -y0,y0,a        X:(r1),x1
  78.         asl        a
  79.         asl        a
  80.         add        x1,a            X:(r2),x1
  81.  
  82.         mpy        x0,y0,a        a,x0
  83.         rep        #<3
  84.         asl        a
  85.         add        x1,a            #>1,x1
  86.         add        x1,b            #>32,x1
  87.         cmp        x1,b            a,y0
  88.         jlt        <Pixel_Loop
  89.  
  90. Send_PixL    jclr        #<HTDE,X:<<HSR,Send_PixL
  91.         movep    b1,X:<<HTX
  92.  
  93.         move        X:(r0),a
  94.         add        y1,a
  95.         move        a,X:(r0)
  96.         
  97. Line_Loop
  98.  
  99.         move        Y:(r4),a
  100.         add        y1,a
  101.         move        a,Y:(r4)
  102. Screen_Loop
  103.  
  104.         jmp        <Loop
  105.  
  106.  
  107.             org        x:$1f8
  108.  
  109. Reelle        DS        1
  110. X_Dep        DS        1
  111. C_Re            DS        1
  112. C_Im            DS        1
  113.  
  114.             org        y:$1f8
  115.  
  116. Imaginaire    DS        1
  117.